using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FerrScript.Builder
{
    public class ConditionBlock : BuilderBlock
    {
        #region Fields
        string condition;
        #endregion

        #region Properties
        public string Condition
        {
            get { return condition; }
            set { condition = value; }
        }
        #endregion

        #region Constructors
        public ConditionBlock() : this("") { }
        public ConditionBlock(string aCondition)
        {
            condition = aCondition;
        }
        #endregion

        #region Overrides
        public override string ToString()
        {
            return "(if " + condition + " ";
        }
        #endregion

        #region Abstract overrides
        public override string BlockName
        {
            get { return "Cond"; }
        }
        public override ParenType ParenType
        {
            get { return ParenType.Open; }
        }
        public override BlockType BlockType
        {
            get { return BlockType.Condition; }
        }
        public override string Description
        {
            get { return "If " + condition; }
        }
        public override string IconName
        {
            get { return "If.png"; }
        }
        #endregion
    }
}